<?php

/**
 * sfGuardUserProfile form.
 *
 * @package    Skajpaj
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class sfGuardUserProfileForm extends BasesfGuardUserProfileForm
{
  public function configure()
  {
      parent::configure();
      unset($this['points']);
      $years = range(date('Y') - 5, date('Y') - 100);
      $this->widgetSchema['regulation'] = new sfWidgetFormInputCheckbox();
      $this->widgetSchema['birthday'] = new sfWidgetFormDate(array('format' =>'%day%/%month%/%year%', 'years' => $years));
      $this->validatorSchema['birthday']->setMessage('invalid', 'Nieprawidłowa data');
      $this->widgetSchema['sex']->setOption('choices', array(''=>'', 'M' => 'M', 'K' => 'K'));
      
      $this->widgetSchema->setLabels(array(
         'sex' => 'Płeć',
          'birthday' => 'Data urodzin',
          'regulation' => 'Akceptuję regulamin serwisu'
      ));
      
      $this->validatorSchema['regulation'] = new sfValidatorBoolean(array('required' => true), array());
  }
}
